import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

const login = ()=>import('../views/login')

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
	{
	  path: '/home',
	  name: 'Home',
	  component: Home
	},
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: login
  },
	
	{
	  path: '/about',
	  name: 'About',
	  // route level code-splitting
	  // this generates a separate chunk (about.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
	},
	{
	  path: '/movie',
	  name: 'Movie',
	  // route level code-splitting
	  // this generates a separate chunk (about.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import(/* webpackChunkName: "about" */ '../views/movie.vue')
	},
	{
	  path: '/play',
	  name: 'Play',
	  component: () => import(/* webpackChunkName: "about" */ '../views/play.vue')
	},
	{
	  path: '/poster',
	  name: 'poster',
	  component: () => import(/* webpackChunkName: "about" */ '../views/poster.vue')
	},
	{
	  path: '/publish',
	  name: 'publish',
	  component: () => import(/* webpackChunkName: "about" */ '../views/publish.vue')
	},
	{
	  path: '/login',
	  name: 'login',
	  component: () => import(/* webpackChunkName: "about" */ '../views/login.vue')
	},
	{
	  path: '/reg',
	  name: 'reg',
	  component: () => import(/* webpackChunkName: "about" */ '../views/reg.vue')
	}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
